home *** CD-ROM | disk | FTP | other *** search
/ Sun Solutions 1997 April to September / Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso / products / Confluent / note_colormap.txt < prev    next >
Text File  |  1995-10-17  |  7KB  |  191 lines

  1. ----------------------------------------------------------------------
  2. Colormap Problems
  3.  
  4. Last update: 10 September 1995
  5.  
  6. Confluent Technical Notes
  7. Copyright (c) 1995 Confluent, Inc.  All rights reserved.
  8. Suggestions or questions to 415-586-8700 or vthought@confluent.com.
  9. ----------------------------------------------------------------------
  10.  
  11. This technical note describes typical X colormap problems encountered
  12. with Visual Thought and their resolution.
  13.  
  14. If the X server colormap is not properly configured prior to running
  15. Visual Thought, the following problems can occur:
  16.  
  17.  1. Visual Thought fails to start, usually issuing an "arithmetic
  18.     exception" or a "floating exception" message.
  19.  
  20.  2. Visual Thought issues warning messages regarding colormap problems.
  21.  
  22.  3. Colors flash when the window focus changes.
  23.  
  24.  4. Colors are dithered due to insufficient available colors.
  25.  
  26.  5. Window background colors are displayed incorrectly.
  27.  
  28. These problems can usually be eliminated by quitting all
  29. color-intensive applications (e.g., FrameMaker, Netscape, Visual
  30. Thought, xv, etc.) and executing the following commands:
  31.  
  32.   % xstdcmap -delete default
  33.   % xstdcmap -default
  34.  
  35. If the problems persist, it might be necessary to restart the X server
  36. and the window manager and execute the above commands before starting
  37. any color-intensive applications.
  38.  
  39. Generally, colormap problems can be avoided by doing either of the
  40. following after the X server and window manager are started:
  41.  
  42.  1. Execute the above xstdcmap commands before starting any
  43.     color-intensive applications.
  44.  
  45.  2. Start Visual Thought (or any other application that creates the
  46.     RGB_DEFAULT_MAP standard colormap property) before starting other
  47.     color-intensive applications.
  48.  
  49. More information regarding the use of colormaps is provided in the
  50. following sections.
  51.  
  52.  
  53. ICCCM Compliance
  54. ----------------
  55. Color use by Visual Thought is ICCCM-compliant.  Colors are obtained
  56. from the RGB_DEFAULT_MAP standard colormap property on the X server.
  57. This standard colormap is configured as a cube of colorcells with
  58. variations of red, green, and blue components along the three
  59. coordinate directions of the cube.  This approach allows all
  60. ICCCM-compliant applications to allocate colorcells from the same
  61. colormap, avoiding excessive allocation and color flashing as the
  62. window focus changes.
  63.  
  64.  
  65. ICCCM-compliant Colormap Allocation
  66. -----------------------------------
  67. When Visual Thought starts, it determines whether the RGB_DEFAULT_MAP
  68. standard colormap property already exists for the default visual.  If
  69. the standard colormap exists, it is used by Visual Thought.
  70. Otherwise, Visual Thought creates the standard colormap for use by
  71. itself and subsequently started ICCCM-compliant applications.
  72.  
  73. When Visual Thought creates the RGB_DEFAULT_MAP standard colormap, it
  74. allocates a color cube with the same number of colors along each
  75. direction of the cube.  If at least 125 colorcells are available, the
  76. allocated color cube contains 125 colorcells (i.e., 5 red x 5 green x
  77. 5 blue, as set up by "xstdcmap -default").  Otherwise, the allocated
  78. color cube is as large as possible, given the number of available
  79. colorcells.
  80.  
  81. If the size of the RGB_DEFAULT_MAP standard colormap is too small,
  82. there might not be sufficient colors available for display without
  83. dithering.
  84.  
  85. If the RGB_DEFAULT_MAP standard colormap does not exist and Visual
  86. Thought cannot create it, Visual Thought might fail to start, issue
  87. warning messages, or exhibit color flashing when the window focus
  88. changes.
  89.  
  90.  
  91. Colormap Allocation by Non-compliant Applications
  92. -------------------------------------------------
  93. Applications that are not ICCCM-compliant typically allocate colors
  94. upon startup without using standard colormaps.
  95.  
  96. If a standard colormap exists, colors may be used from the standard
  97. colormap or allocated outside the standard colormap.  The colorcells
  98. in the standard colormap will remain available to all ICCCM-compliant
  99. applications.
  100.  
  101. However, if a standard colormap does not exist, the non-compliant
  102. application may allocate many of the available colorcells.  There
  103. might be so few remaining available colorcells that a subsequently
  104. started ICCCM-compliant application would fail to allocate a standard
  105. colormap or only be able to allocate one with very few colors.
  106.  
  107.  
  108. Determining the Standard Colormap Properties
  109. --------------------------------------------
  110. The properties of the RGB_DEFAULT_MAP standard colormap can be
  111. determined with the following command:
  112.  
  113.   xprop -root RGB_DEFAULT_MAP
  114.  
  115. If the standard colormap property is defined on the X server, the
  116. output should look something like the following:
  117.  
  118.   RGB_DEFAULT_MAP(RGB_COLOR_MAP):
  119.     colormap id #: 0x80074
  120.     red-max: 4
  121.     red-mult: 1
  122.     green-max: 4
  123.     green-mult: 25
  124.     blue-max: 4
  125.     blue-mult: 5
  126.     base-pixel: 20
  127.  
  128. The red-max, green-max, and blue-max values indicate the maximum color
  129. indices along the three directions of the color cube.  The indices
  130. start at 0, so the above output indicates that the color cube has 5
  131. colors along each direction.  If the *-max values are not all the
  132. same, Visual Thought will issue a warning message and might display
  133. window background colors incorrectly (they should be light gray).
  134.  
  135.  
  136. HP-UX
  137. -----
  138. When the HP-UX X server starts, it creates the RGB_DEFAULT_MAP
  139. standard colormap with the following properties:
  140.  
  141.   red-max: 7
  142.   green-max: 7
  143.   blue-max: 3
  144.  
  145. This standard colormap has unequal *-max values.  If it is present
  146. when Visual Thought starts, Visual Thought will issue a warning
  147. message and might display window background colors incorrectly (they
  148. should be light gray).
  149.  
  150. This problem can be eliminated by executing the following commands:
  151.  
  152.   % xstdcmap -delete default
  153.   % xstdcmap -default
  154.  
  155. The xstdcmap program is not distributed with HP-UX.  If you do not
  156. already have xstdcmap on your system, a copy is provided in the
  157. following Confluent directory (assuming Visual Thought has been
  158. installed in /usr/local/confluent):
  159.  
  160.   /usr/local/confluent/util-1.2/hpux-9/bin
  161.  
  162.  
  163. FrameMaker
  164. ----------
  165. FrameMaker 4.0 does not use standard colormaps.  Before starting
  166. FrameMaker 4.0, the RGB_DEFAULT_MAP standard colormap should be
  167. created with xstdcmap or by starting Visual Thought.
  168.  
  169. FrameMaker 5.0 uses standard colormaps.  However, the default standard
  170. colormap is named _FRAME_COLORCUBE, not RGB_DEFAULT_MAP.  If the
  171. default standard colormap is used, it will not be shared with other
  172. ICCCM-compliant applications.  To cause FrameMaker to use the
  173. RGB_DEFAULT_MAP standard colormap and share it with other
  174. applications, set the following FrameMaker resource:
  175.  
  176.   Maker.standardColorCubeName: RGB_DEFAULT_MAP
  177.  
  178. See the FrameMaker online manual "Changing Setup Files" for
  179. instructions on setting FrameMaker resources.
  180.  
  181.  
  182. Netscape Navigator
  183. ------------------
  184. The Netscape Navigator 1.1N does not use standard colormaps.  By
  185. default, it tends to allocate all available colors.  Before starting
  186. Netscape 1.1N, the RGB_DEFAULT_MAP standard colormap should be created
  187. with xstdcmap or by starting Visual Thought.
  188.  
  189. We have found that Netscape is the most frequent cause of color map
  190. conflicts with other applications such as Visual Thought.
  191.